#include "CApp.h"
 
void CApp::OnCleanup() {
	SDL_FreeSurface(Surf_Test); //Tar bort bilden ur minnet
    SDL_FreeSurface(Surf_Display); // -ll-
	SDL_Quit(); //Makes the game end and clean up the screen

	for(int i = 0;i < (int)CEntity::EntityList.size();i++) {
		if(!CEntity::EntityList[i]) continue;
 
		CEntity::EntityList[i]->OnCleanup();
	}

	CArea::AreaControl.OnCleanup();
 
	CEntity::EntityList.clear();
}